/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: lynn
 * @Date: 2020-10-21 20:54:58
 * @LastEditors: lynn
 * @LastEditTime: 2020-10-21 22:08:18
 */
import {getPaperList,createPaper,updatePaper,getExamList,createExam,updateExam} from "@/api/paper"
//getPaperList 获取试题数据
//createPaper  创建试题
//updatePaper  修改试题
//getExamList  获取考试数据
//createExam   创建试卷
//updateExam   修改试卷

const state = {
    paperList :[],
}

const mutations = {
    geTestQuestions(state,validata){
        state.paperList=validata
        console.log(state.paperList)
    }
}

const actions = {
    async getPaperList({commit}){
        let res = await getPaperList();
        if(res){
            commit("geTestQuestions",res.data)
        }
        console.log(11)
        
    }
}

export default {
    namespaced:true,
    state,
    mutations,
    actions
}

